package rctgl.park.sv4;

public class UnitTypes
{
	public static final int SURFACE_TILE = 0;		//0000 = surface tile
	public static final int PATH = 1;				//0001 = path (& road)
	public static final int TRACK_SHOP = 2;		//0010 = track element  or shop/stall
	public static final int SCENERY_SINGLE = 3;	//0011 = scenery item (single tile)
	public static final int ENTRANCE = 4;			//0100 = ride entry/exit, Park entrance
	public static final int FENCE = 5;			//0101 = fence(s)/wall(s)
	public static final int SCENERY_MULTIPLE = 6;	//0110 = scenery item (multiple tile)
	public static final int BANNER = 7; 			//0111 = banners 

	public static int getCode(int baseByte)
	{
		//System.out.println( Integer.toBinaryString(baseByte));
		//00111100
		return (baseByte >> 2) & 0xF;
	}
	
	public static String getName(int code)
	{
		switch(code)
		{
		case SURFACE_TILE:
			return "SURFACE_TILE";
		case PATH:
			return "PATH";
		case TRACK_SHOP:
			return "TRACK_SHOP";
		case SCENERY_SINGLE:
			return "SCENERY_SINGLE";
		case ENTRANCE:
			return "ENTRANCE";
		case FENCE:
			return "FENCE";
		case SCENERY_MULTIPLE:
			return "SCENERY_MULTIPLE";
		case BANNER:
			return "BANNER";
		default:
			return "UNKNOWN. CODE=" + code;
		}
	}
}
